<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="string" uri="http://jakarta.apache.org/taglibs/string-1.1" %>
<%@ taglib uri="/WEB-INF/tlds/pagination.tld" prefix="pagination" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <title>Dayve web</title>
    <link href="/common/css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript">
        // 페이지 이동을 처리한다.
        function goListPage(page) {
            var TheForm = document.frm;
            TheForm.currentPage.value = page;
            TheForm.nextTarget.value = 'adminMemberList';
            TheForm.action = './adminMemberList.do';
            TheForm.submit();
        }

        // 검색어로 리스트를 출력한다.
        function jsSearchList() {
            var TheForm = document.frm;
            TheForm.id.value = TheForm.search_id.value;
            TheForm.nick_name.value = TheForm.search_nick_name.value;
            TheForm.email.value = TheForm.search_email.value;
            TheForm.nextTarget.value = 'adminMemberList';
            TheForm.action = './adminMemberList.do';
            TheForm.submit();
        }

        // 글쓰기 페이지로 이동 : 세션이 존재할 때만 가능
        function jsWriteBoard() {
            var TheForm = document.frm;
            TheForm.nextTarget.value = 'communityBoardWrite';
            TheForm.action = './communityBoardWrite.do';
            TheForm.submit();
        }

        // 게시물 보기 페이지로 이동
        function jsContentView() {
            var TheForm = document.frm;
            TheForm.nextTarget.value = 'communityBoardContent';
            TheForm.action = './communityBoardContent.do';
            TheForm.submit();
        }

        // Community Board List 페이지로 이동한다.
        function jsCommunityBoardList() {
            var TheForm = document.menuFrm;
            TheForm.nextTarget.value = "communityBoardList";	// page name
            TheForm.action = "./communityBoardList.do";
            TheForm.submit();
        }

        // Photo Board List 페이지로 이동한다.
        function jsPhotoBoardList() {
            var TheForm = document.menuFrm;
            TheForm.nextTarget.value = "photoBoardList";	// page name
            TheForm.action = "./photoBoardList.do";
            TheForm.submit();
        }

        // Notice Board List 페이지로 이동한다.
        function jsNoticeBoardList() {
            var TheForm = document.menuFrm;
            TheForm.nextTarget.value = "noticeBoardList";	// page name
            TheForm.action = "./noticeBoardList.do";
            TheForm.submit();
        }

        // Contact Us 페이지로 이동한다.
        function jsContactUs() {
            var TheForm = document.menuFrm;
            TheForm.nextTarget.value = "contactus";	// page name
            TheForm.action = "./contactus.do";
            TheForm.submit();
        }

        // FAQ 페이지로 이동한다.
        function jsFAQ() {
            var TheForm = document.menuFrm;
            TheForm.nextTarget.value = "faq";	// page name
            TheForm.action = "./faq.do";
            TheForm.submit();
        }


    </script>
</head>


<body>
<div id="wrapper">
    <!------------------------------ top 시작-------------------------------------->
    <%@include file="header.jsp" %>
    <!------------------------------ top 끝-------------------------------------->
    <div class="mypage_content">
        <div class="mypage_content">
            <form name="frm" method="POST">
                <input type="hidden" name="id" value="${param.search_id}">
                <input type="hidden" name="nick_name" value="${param.search_nickName}">
                <input type="hidden" name="email" value="${param.search_email}">
                <input type="hidden" name="nextTarget" value="">
                <input type="hidden" name="currentPage" value="${currentPage}">


                <img src="/images/intro/sub_title08.gif"  />
                <a href="admin.do"><input name="Input" class="admin_button_off" value="<spring:message code="adminMemberList.topButton1" />" /></a>
                <a href="adminMemberList.do?id&nick_name&email"><input name="Input" class="admin_button_on" value="<spring:message code="adminMemberList.topButton2" />" /></a>
                <a href="adminStatistic.do"><input name="Input" class="admin_button_off" value="<spring:message code="adminMemberList.topButton3" />" /></a>
                <p class="admin_subtitle"><spring:message code="adminMemberList.subtitle" /></p>
                <table class="mypage_tb">
                    <tr>
                        <td class="admin_no">ID</td>
                        <td class="admin_label">NICK_NAME</td>
                        <td class="admin_label">EMAIL</td>
                        <td class="admin_label">MOBILE_PHONE_NO</td>
                        <td class="admin_label">COUNTRY</td>
                        <td class="admin_label">HOME_PAGE</td>
                        <td class="admin_label">BIRTHDAY</td>
                        <td class="admin_label">SEX</td>
                        <td class="admin_label">MILEAGE</td>
                        <td class="admin_label">MODIFY_DATE</td>
                        <td class="admin_lastlabel">REGISTER_DATE</td>
                    </tr>
                    <c:set var="totalCount" value="${totalRow}"/>
                    <c:forEach items="${memberList}" var="memberList" varStatus="serviceStatus" begin="0" end="20"
                               step="1">

                        <tr>
                            <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.id}</a></td>
                            <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.nick_name}</a></td>
                            <td class="admin_dataleft"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.email}</a></td>
                            <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.mobile_phone_number}</a></td>
                            <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.country}</a></td>
                            <td class="admin_dataleft"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.home_page}</a></td>
                            <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.birthday}</a></td>
                            <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.sex}</a></td>
                            <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.mileage}</a></td>
                            <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.modify_date}</a></td>
                            <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.register_date}</a></td>
                        </tr>
                    </c:forEach>
                </table>
                <!------------------------- 페이징 ------------------------------------------>
                <div class="content_center">
                    <pagination:paging>
                        <pagination:function>goListPage</pagination:function> <!-- 자바스크립트 함수 -->
                        <pagination:currentPage>${currentPage}</pagination:currentPage> <!-- 현재페이지 -->
                        <pagination:totalRows>${totalRow}</pagination:totalRows> <!-- 전체글수 -->
                        <pagination:pageSize>${pageSize}</pagination:pageSize> <!-- 페이지당 조회건수 -->
                    </pagination:paging>
                    <!--
                    <img src="/images/intro/btn_first.gif" class="tb_btn" />
                    <img src="/images/intro/btn_prev.gif" class="tb_btn" />
                    1 2 3 4 5
                    <img src="/images/intro/btn_next.gif" class="tb_btn" />
                    <img src="/images/intro/btn_last.gif" class="tb_btn" />
                    -->
                </div>
                <!------------------------- 페이징 끝 -------------------------------------->
                <table class="search_tb">
                    <tr>
                        <td >&nbsp;</td>
                        <td width="21%" class="search_text">ID :</td>
                        <td width="21%" class="search_text">Nickname : </td>
                        <td width="21%" class="search_text">E-Mail :</td>
                        <td width="21%" class="search_text">&nbsp;</td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td><input type="text" name="search_id" id="search_id" class="admin_input"  value="${param.search_id}" /></td>
                        <td><input type="text" name="search_nick_name" id="search_nick_name" class="admin_input"  value="${param.search_nick_name}" /></td>
                        <td><input type="text" name="search_email" id="search_email" class="admin_input"  value="${param.search_email}" /></td>
                        <td><a href="javascript:jsSearchList()"><img src="/images/intro/btn_search.gif"  /></a></td>
                    </tr>
                </table>
            </form>
        </div>
        <!------------------------------ 하위메뉴 시작-------------------------------------->
        <%@include file="footer.jsp" %>
        <!------------------------------ 하위메뉴 끝-------------------------------------->
    </div>
</body>
</html>